public class Test {
    public static void main(String[] args) {
        Solution solution = new Solution();
        TreeNode root = new TreeNode(4,new TreeNode(2),new TreeNode(7));
        root.left.left = new TreeNode(1);
        root.left.right = new TreeNode(3);
        root.right.left = new TreeNode(6);
        root.right.right = new TreeNode(9);

        System.out.print("翻转之前：");
        solution.PrevOrder(root);
        System.out.println();

        solution.invertTree(root);

        System.out.print("翻转之后：");
        solution.PrevOrder(root);
    }
}
